<template>
    <div class="box-total-wrapper clearfix">
        <h3>今日大盘</h3>
        <div>
          <p>
            <span class="num"><span class="stonefont">{{ todayBoxOffice.totalAmount }}</span></span> {{ todayBoxOffice.unit }}
            <a class="more" target="_blank" data-act="moreDayTip-click" href="https://piaofang.maoyan.com/">查看更多 <span class="panel-arrow panel-arrow-red"></span></a>
          </p>
          <p class="meta-info">
            北京时间 {{ getTime }}
            <span class="pull-right">开心专业版实时票房数据</span>
          </p>
        </div>
    </div>
</template>

<script>
import dayjs from 'dayjs'
import { mapState } from 'vuex'
export default {
  name: 'TtmsTotalbox',

  data () {
    return {

    }
  },
  computed: {
    getTime () {
      // 按照时:分:秒的形式获取北京时间
      return dayjs().format('HH:mm:ss')
    },
    ...mapState('home', ['todayBoxOffice'])
  },

  mounted () {
    this.$store.dispatch('home/getTodayBoxOffice')
  },

  methods: {

  }
}
</script>

<style lang="scss" scoped>
.box-total-wrapper {
    margin-top: 29px;
    background-color: #fdfdfd;
    border: 1px solid #efefef;
    padding-right: 15px;
}
.clearfix:after, .clearfix:before {
    content: " ";
    display: table;
}
.box-total-wrapper>h3 {
    float: left;
    width: 20px;
    height: 83px;
    padding: 10px;
    color: #fff;
    background-color: #ef4238;
    text-align: center;
    font-weight: 400;
    font-size: 17px;
    line-height: 21px;
}
.box-total-wrapper>div {
    font-size: 14px;
    margin-left: 54px;
    color: #ef4238;
    padding-top: 20px;
}
.box-total-wrapper>div .num {
    font-size: 30px;
    font-weight: 700;
    margin-right: 2px;
}
.stonefont {
    font-family: mtsi-font;
}
.box-total-wrapper>div a.more[href] {
    color: #ef4238;
    margin-top: 13px;
    float: right;
    line-height: 16px;
}
.more {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}
.panel-arrow-red {
    background: url() top no-repeat;
}
.panel-arrow {
    display: inline-block;
    width: 8px;
    height: 14px;
    vertical-align: top;
}
dd, dl, dt, h1, h2, h3, h4, h5, h6, li, p, ul {
    margin: 0;
    padding: 0;
}
.box-total-wrapper>div .meta-info {
    color: #999;
    margin-top: 6px;
}
.pull-right {
    float: right!important;
}
</style>
